-- GENERATED SPELL FOR [Warp Aberration] --


function spell0_18865(pUnit, Event) --@Arcane Shield,n/a--
pUnit:FullCastSpellOnTarget(36640,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18865', 0, 1)
end

function spell1_18865(pUnit, Event) --@Create Elemental Power,n/a--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(34525,pUnit:GetMainTank ())
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_18865', 1, 1)
end

function spell2_18865(pUnit, Event) --@Warp Storm,n/a--
pUnit:FullCastSpellOnTarget(36577,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18865', 22000, 1)
end

function Sorts_18865(pUnit, Event)
local choix_sorts_18865 = math.random(0, 2)
if choix_sorts_18865 == 0 then
pUnit:RegisterEvent('spell0_18865', 1, 1)
end
if choix_sorts_18865 == 1 then
pUnit:RegisterEvent('spell1_18865', 1, 1)
end
if choix_sorts_18865 == 2 then
pUnit:RegisterEvent('spell2_18865', 1, 1)
end
end

function mob18865_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18865', math.random(1500, 3000), 1)
end

function mob18865_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18865_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18865_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18865, 1, 'mob18865_Action')
RegisterUnitEvent(18865, 2, 'mob18865_Leave')
RegisterUnitEvent(18865, 3, 'mob18865_Kill')
RegisterUnitEvent(18865, 4, 'mob18865_Die')
